package com.weijianhuawen.wjblog.common.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @version: java version 8
 * @Author: weijianhuawen
 * @description: 邮箱校验器
 * @date: 2025-03-26 0:24
 */

@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE,ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = MailNameValidator.class)
public @interface MailName {
    String message() default "邮箱格式不正确，请输入正确格式的邮箱！例如：xiaohushu123@163.com";

    Class<?>[] groups() default {};

    Class<? extends Payload> [] payload() default {};
}
